﻿@*@using Super.Entity
@using Super.Framework.Common
@model Super.Entity.Role
@{
    Layout = "~/Areas/Admin/Views/Shared/_PopLayout.cshtml";
}
<article class="page-container">
    <form class="form form-horizontal" id="form-admin-role" action="/admin/role/edit" method="post">
        <input hidden="" value="@Model.Id" id="id" name="id" />
        <div class="row cl">
            <label class="form-label col-xs-4 col-sm-2">角色名称：</label>
            <div class="formControls col-xs-8 col-sm-10">
                <input type="text" class="input-text" value="@Model.Name" placeholder="" id="name" name="name">
            </div>
        </div>
        <div class="row cl">
            <label class="form-label col-xs-4 col-sm-2">描述：</label>
            <div class="formControls col-xs-8 col-sm-10">
                <input type="text" class="input-text" value="@Model.Description" placeholder="" id="description" name="description">
            </div>
        </div>
        <div class="row cl">
            <label class="form-label col-xs-4 col-sm-2">code：</label>
            <div class="formControls col-xs-8 col-sm-10">
                <input type="text" class="input-text" value="@Model.Code" placeholder="" id="code" name="code">
            </div>
        </div>
        <div class="row cl">
            <label class="form-label col-xs-4 col-sm-2">平台角色：</label>
            <div class="formControls col-xs-8 col-sm-10 skin-minimal">
                @{
                    if (Model.IsPlatform)
                    {
                        <div class="radio-box">
                            <input name="IsPlatform" type="radio"   value="@Model.IsPlatform.ToString().ToLower()" checked="checked">
                            <label for="admin-1">是</label>
                        </div>
                        <div class="radio-box">
                            <input type="radio"  value="false" name="IsPlatform">
                            <label for="admin-2">否</label>
                        </div>
                    }
                    else
                    {
                        <div class="radio-box">
                            <input name="IsPlatform" type="radio"   value="true">
                            <label for="admin-1">是</label>
                        </div>
                        <div class="radio-box">
                            <input type="radio"  name="IsPlatform" checked="checked" value="@Model.IsPlatform.ToString().ToLower()">
                            <label for="admin-2">否</label>
                        </div>
                    }
                }
            </div>
        </div>
        <div class="row cl">
            <div class="col-xs-8 col-sm-5 col-xs-offset-4 col-sm-offset-5">
                <input class="btn btn-primary radius" type="submit" value="&nbsp;&nbsp;提交&nbsp;&nbsp;">
            </div>
        </div>
    </form>
</article>
 
<script type="text/javascript">
    
    $(function () {
        $("#form-admin-role")
            .validate({
                rules: {
                    name: {
                        required: true,
                        minlength: 2,
                        maxlength: 32
                    },
                    description: {
                        required: true,
                        maxlength: 50
                    } 
                },
                onkeyup: false,
                focusCleanup: true,
                success: "valid"

            });
    });
    
</script>*@
